$(document).ready(function(){
	
	tail_1();
	time();
	
	Aud_wle();
	Bel_wle();
	
	setInterval(time, 1000);
//	setInterval(Kno_wle, 5000);
//	setInterval(Aud_wle, 5000);
	 
	fankuixiugai_();
	//信息卡拖动
	$('#dd').draggable({
	    handle:'#title',
	    async: false,
	    onDrag:function(){
	    	
	    	 
		},
		onStopDrag:function(){
		}
	});
	//一级标签收放
	$(document).on("click",".tail_1",function(){var ta = $(this);up_dn_1(ta);});
	//二级标签收放
	$(document).on("click",".tail_2",function(){var ta = $(this);up_dn_2(ta);});
	//标签弹出分页栏
	$(document).on("click",".ti,.hpc_ta",function(){var addym = $(this);addadd(addym);});
	
	$(document).on("click",".He_tx_t_he .He_tcii",function(){
		var He = $(this);
		$(".He_tx_t_he div").removeClass("He_tcii");
		$(".He_tx_t_he div").addClass("He_tcii");
		He.removeClass("He_tcii");
		var i = He.index()+1;
		$(".He_tx_t_1,.He_tx_t_2,.He_tx_t_3").removeClass("none");
		$(".He_tx_t_1,.He_tx_t_2,.He_tx_t_3").addClass("none");
		$(".He_tx_t_"+i).removeClass("none");
	});
	//消息弹出
	$(document).on("click",".He_down",function(){
		var he = $(".He_down_t");
		he.animate({
			height: "400px",
			width:  "240px",
		},1000);
	});
	//消息收起
	$(document).on("click",".He_tx_b img",function(){
		$(".He_down_s").addClass("none");
		var he = $(".He_down_t");
		he.animate({
			height: "0px",
			width:  "66px",
		},500);
	});
	//消息详情
	$(document).on("click",".He_t_t_1,.He_t_t_2",function(){
		var the = $(this);
		$(".He_t_t_3_x").addClass("none");
		$(".He_down_s").removeClass("none");
		$(".He_t_t_1_x").removeClass("none");
		$(".He_bel_img img").attr("src",the.find("img").attr("src"));
		$(".He_bel_iput input").attr("id",the.find("img").attr("id"))
	});
	$(document).on("click",".He_t_t_3",function(){
		var the = $(this);
		$(".He_t_t_1_x").addClass("none");
		$(".He_down_s").removeClass("none");
		$(".He_t_t_3_x").removeClass("none");
		$(".He_t_t_3_x_t_1 img").attr("src", $(this).find(".He_t_img").attr("src"));
		$(".He_t_t_3_x_t_1 div").text($(this).find(".He_t_name").attr("title"));
		$(".He_t_t_3_x_t_2_xq").val($(this).attr("title"));
		$(".He_t_t_3_x_t_3 .green").attr("onclick", $(this).find(".He_t_inp").attr("onclick"));
		$(".He_t_t_3_x_t_3 .red").attr("onclick", $(this).find(".He_t_iup").attr("onclick"));
	});
	//清除操作
	$(".reset_sc").click(function() {
		var r = $("#tit").tabs("tabs").length;
		for(var i = r;0<i;i--){
			close(i);
		}
	});
	$(".reset_zx").click(function() {
		login_zx();
	});
});
function time() {
	var time = new Date();
	var hour = time.getHours();
	var min = time.getMinutes();
	var second = time.getSeconds();
	
	$(".hpc_top_t_h").css("transform","rotate("+hour*30+"deg)");
	$(".hpc_top_t_m").css("transform","rotate("+min*6+"deg)");
	$(".hpc_top_t_s").css("transform","rotate("+second*6+"deg)");
	if(second<10){
		$(".hpc_top_date").text(hour+"："+min+"：0"+second);
	}else{
		$(".hpc_top_date").text(hour+"："+min+"："+second);
	}
}
//页面删除
function close(text) {
	$("#tit").tabs("close",text);
}
function fankuixiugai_(){
	$.ajax({
		type:"post",
		url:'fankuixiugai_s', //数据源地址
		success: function(data){

		}
		
	})
	
}